<template>
  <card-vue title="公告">
    <i class="el-icon-date" slot="title-icon"></i>
    <div slot="body" class="notice">
      {{bulletin}}
    </div>
  </card-vue>
</template>

<script>
  import {queryBulletinList} from "../assets/api/getData";

  export default {
    name: "noticeVue",
    data() {
      return {
        bulletin: ""
      }
    },
    created() {
      this.getBulletin();
    },
    methods: {
      async getBulletin() {
        try {
          let res = await queryBulletinList();
          this.bulletin = res.data.content;
        } catch (err) {
          this.$message.error(err.msg)
        }
      }
    }
  }
</script>

<style lang="less" scoped>
  .notice {
    line-height: 1.5;
  }
</style>
